﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Series;

namespace PlayPlot
{
    /// <summary>
    /// Interaction logic for LineMarkerStyleWin.xaml
    /// </summary>
    public partial class LineMarkerStyleWin : Window
    {
        public PlotModel Plot { get; private set; }

        public LineMarkerStyleWin()
        {
            InitializeComponent();

            Plot = new PlotModel("Line Style & Marker Type") { PlotMargins = new OxyThickness(10) };
            Plot.Axes.Add(new LinearAxis(AxisPosition.Bottom));
            Plot.Axes.Add(new LinearAxis(AxisPosition.Left));

            // no title, no legend
            var line = new LineSeries("CURVE")
                           {
                               Color = OxyColors.Transparent,
                               MarkerSize = 4,
                               LineStyle = LineStyle.None,
                               MarkerFill = OxyColors.SkyBlue,
                               MarkerType = MarkerType.Diamond
                           };
            Plot.Series.Add(line);

            for (int index = 0; index < 100; index++)
            {
                line.Points.Add(new DataPoint(index, Math.Sin(index)));
            }

            this.DataContext = this;
        }

    }
}
